<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\select2\Select2;

/* @var $this yii\web\View */
/* @var $model backend\models\RadoLocations */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="rado-locations-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'code')->textInput() ?>
    <?= $form->field($model, 'uuid')->textInput() ?>
    <?= $form->field($model, 'shop')->textInput(['maxlength' => true]) ?>
    <?= $form->field($model, 'address')->textInput(['maxlength' => true]) ?>
    <?= $form->field($model, 'role')->widget(Select2::classname(), [
            'data' => ['dev'=>'开发测试','shop'=>'门店'],
            'value' =>  isset($model->role)?$model->role:'dev',
            'language' => Yii::$app->language,
            'hideSearch' => true,
            'options' => ['multiple' => false, 'placeholder' => Yii::t('app','Please choose ...')],
        ])
    ?>



    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success', 'style'=>'width:100%']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
